﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace VIP.Extension
{

    public static class VIPClassExtension
    {

        /// <summary>
        /// 判断对象是否为空    
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="selfObj"></param>
        /// <returns></returns>
        public static bool IsNull<T>(this T selfObj) where T : class
        {
            if (selfObj == null)
            {
                return true;
            }
            return false;
        }

        /// <summary>
        /// 判断对象是否不为空
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="selfObj"></param>
        /// <returns></returns>
        public static bool IsNotNull<T>(this T selfObj) where T : class
        {
            if (!(null == selfObj))
            {
                return true;
            }
            return false;
        }

    }

}